:art: TWJC_QRCODE_URL_HASH

huangqimin001 3 anni fa
parent
commit
aa52045c54
2 ha cambiato i file con 4 aggiunte e 4 eliminazioni
  1. 1 1
      utils/redis/rkeys.py
  2. 3 3
      utils/redis/rqrurl.py

+ 1 - 1
utils/redis/rkeys.py

@@ -1,5 +1,5 @@
1 1
 # -*- coding: utf-8 -*-
2 2
 
3
-HY_QRCODE_URL_HASH = 'twjc:qrcode:url:hash'  # scene:qrcode_url
3
+TWJC_QRCODE_URL_HASH = 'twjc:qrcode:url:hash'  # scene:qrcode_url
4 4
 TWJC_POINT_INFO = 'twjc:point:info:%s'  # uuid:point_id
5 5
 TWJC_SCREEN_INFO = 'twjc:screen:info:%s'  # point_id:screen_info

+ 3 - 3
utils/redis/rqrurl.py

@@ -2,18 +2,18 @@
2 2
 
3 3
 from api.wx_views import get_point_limit_scene_qrcode_url
4 4
 from utils.redis.connect import r
5
-from utils.redis.rkeys import HY_QRCODE_URL_HASH
5
+from utils.redis.rkeys import TWJC_QRCODE_URL_HASH
6 6
 
7 7
 
8 8
 def set_qrcode_url(scene):
9 9
     qrcode_url = get_point_limit_scene_qrcode_url(scene)
10 10
     if qrcode_url:
11 11
         try:
12
-            r.hset(HY_QRCODE_URL_HASH, scene, qrcode_url)
12
+            r.hset(TWJC_QRCODE_URL_HASH, scene, qrcode_url)
13 13
         except Exception as e:
14 14
             pass
15 15
     return qrcode_url
16 16
 
17 17
 
18 18
 def get_qrcode_url(scene):
19
-    return r.hget(HY_QRCODE_URL_HASH, scene) or set_qrcode_url(scene)
19
+    return r.hget(TWJC_QRCODE_URL_HASH, scene) or set_qrcode_url(scene)